package com.mk.seckill.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mk.seckill.pojo.Order;
import com.mk.seckill.pojo.User;
import com.mk.seckill.vo.GoodsVo;
import com.mk.seckill.vo.OrderDetailVo;

public interface IOrderService extends IService<Order> {

    // 根据订单id查询订单详情
    OrderDetailVo detail(Long orderId);

    // 秒杀下单
    Order seckill(User user, GoodsVo goodsVo);

    // 生成秒杀地址
    String createPath(User user, Long goodsId);

    // 校验当前用户是否和当前访问的秒杀地址匹配
    boolean checkPath(User user, Long goodsId, String path);

    // 校验验证码
    boolean checkCaptcha(User user, Long goodsId, String captcha);
}
